package cn.virens;

public class RingBufferTseet {
    public static void main(String[] args) {
        RingBuffer buffer = new RingBuffer(8);

        for (int i = 0; i < 32; i++) {
            buffer.push((byte) i);
            System.out.println(buffer);

            if (i % 9 == 0) {
                int ss1 = buffer.pop();
                int ss2 = buffer.pop();

                System.out.println("Read:" + ss1 + "_" + ss2);
            }
        }

    }
}
